package ParseFile;

import java.io.*;

public class ParseFile {
	public boolean isKeyInString(String key, String currentString) {
		if (currentString.contains("===" + key + "===")) {
			return true;
		}
		else return false;

	}
	public boolean isKeyInString(String key, String currentString) {
		if (currentString.contains("===" + key + "===")) {
			return true;
		}
		else return false;

	}

	public StringBuffer find(File f) {
		FileReader fr = null;
		BufferedReader br = null;
		try {
			fr = new FileReader(f);
			br = new BufferedReader(fr);
		} catch (FileNotFoundException e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		}

		StringBuffer sb = new StringBuffer();
		;

		try {

			while (br.ready()) {
				sb.append((br.readLine()));
				sb.append("\n");
			}
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} finally {
			try {
				br.close();
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
		return sb;
	}
}
